# from tqdm import tqdm
# ftrain = open("G:/dataset_ru25fit_scence/test_check2.txt","r",encoding="utf-8")
# ftrain2 = open("G:/dataset_ha25fit_scence/test_check2.txt","r",encoding="utf-8")
#
# fwtrain = open("E:/test_check2.txt","w",encoding="utf-8")
# set1 = set()
# lines = ftrain.readlines()
#
# for line in tqdm(lines):
#     # line = "dataset_ru25fit_scence/" + line
#     set1.add(line)
# lines2 = ftrain2.readlines()
# for line in tqdm(lines2):
#     # line = "dataset_ru25fit_scence/" + line
#     set1.add(line)
#
# for set11 in tqdm(set1):
#     fwtrain.write(set11)


from tqdm import tqdm
ftrain = open("C:/Users/fubaoyin/Desktop/test/ha-svtr-background/chars.txt","r",encoding="utf-8")
ftrain2 = open("C:/Users/fubaoyin/Desktop/test/ru-crnn-bg/chars.txt","r",encoding="utf-8")

fwtrain = open("E:/chars.txt","w",encoding="utf-8")
set1 = list()
lines = ftrain.readlines()

for line in tqdm(lines):
    # line = "dataset_ru25fit_scence/" + line
    set1.append(line)
lines2 = ftrain2.readlines()
for line in tqdm(lines2):
    # line = "dataset_ru25fit_scence/" + line
    if line not in set1 :
        set1.append(line)

for set11 in tqdm(set1):
    fwtrain.write(set11)




